Issue 1601 - Implement check mesh resolution#1630
Open
Conversation
commit 1bcfcac4c3b88ff2a84e16715a216652bf905dfb
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Tue Feb 3 16:03:44 2026 -0500
Added 3D support
commit a0c2e1e4c632dfc318548bc3033160b2b5b97807
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Tue Feb 3 15:32:18 2026 -0500
Updated the code fully to be fully templated.
commit cc56d3d8edf5690d6ee08defb1ea982e5a68006c
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Tue Feb 3 10:47:44 2026 -0500
Updated the boundaing box to use a registerarray
commit 535150a
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Mon Feb 2 14:21:29 2026 -0500
Updated the tests to match upstream fix
commit 3754efc
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Mon Feb 2 08:41:19 2026 -0500
Added ScatterMinMax struct for simpler interface of scatter reduction
commit 23c31ee
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Mon Feb 2 08:20:41 2026 -0500
Split out the core functions and tested them
commit 444cc82
Merge: 94052e3 fc0558a
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Mon Feb 2 07:58:36 2026 -0500
Merge branch 'devel' into issue-1601
commit 94052e3
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Mon Feb 2 07:57:35 2026 -0500
Added all the missing files
commit 868eebb
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Mon Feb 2 07:54:15 2026 -0500
Created 2D Info version.
commit 1132f0b
Author: Lucas Sawade <lsawade@princeton.edu>
Date: Fri Jan 30 13:52:46 2026 -0500
Added computation of GLL point properties.
Rohit-Kakodkar
approved these changes
Feb 4, 2026
| this->edge_types, this->mesh }; | ||
| this->fields = { this->mesh, this->element_types, simulation }; | ||
|
|
||
| this->info = { *this }; |
Collaborator
There was a problem hiding this comment.
Can you pass different structs individually, similar to the functions we do above.
| this->check_jacobian_matrix(); | ||
|
|
||
|
|
||
| this->info = {*this}; |
icui
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the computation of the mesh characteristic properties using
for_allloop over all GLL points and a scatterview that is required to store and access element-wise reductions. Implemented as a unified struct for both 2 and 3D,specfem::assembly::Info<dimension_tag>without specialization of the struct, but specialization of some of the methods under the hood.Info Constructor Description:
The Info struct constructor unifies 2D and 3D mesh resolution analysis into a single templated definition. The constructor operates in two phases:
- Material properties (vp, vs, rho) min/max
- Domain bounding box coordinates
- Element sizes (corner-to-corner distances)
- GLL point spacing
Results are accumulated into an InfoScatters struct that holds all scatter reducers, including per-element views for velocity and distance bounds.
2. Derived Quantities Phase: A second parallel loop over elements computes the suggested timestep (from CFL condition using minimum GLL spacing and maximum velocity) and the largest minimum resolvable period (from average GLL spacing and minimum velocity).
These per-element values are reduced to obtain global bounds.
The InfoScatters struct uses dimension-templated ScatterMinMax views, allowing the bounding box reducer to be n-dimensional while scalar properties use 1D reductions.
Other necessary implementations
load_on_deviceforglobal_coordinatesspecfem::point::global_coordinates.coordinates()method which returns a viewmesh_entities::element.ngllmember topublicSquashed history
Issue Number
Closes #1601
Checklist
Please make sure to check developer documentation on specfem docs.